unit subDomainUnit;

interface
type
  subDomainClass = class(TObject)
  private
    { Private declarations }
    Name : String;
    topLeft_X, topLeft_Y : double;
    width, height : double;
  public
    (**
        The interface functions (Setters and Getters)
    *)
    procedure set_Name(Nam : String);
    procedure set_topLeft_X(x : double);
    procedure set_topLeft_Y(y : double);
    procedure set_width(w : double);
    procedure set_height(h : double);

    function get_Name():String;
    function get_topLeft_X():double;
    function get_topLeft_Y():double;
    function get_width():double;
    function get_height():double;
    // The constructor
    Constructor Create(Nam : string; x,y,w,h : double); overload;
  end;

implementation

procedure subDomainClass.set_Name(Nam : String);
begin
name := Nam;
end;

procedure subDomainClass.set_topLeft_X(x : double);
begin
topLeft_X := x;
end;

procedure subDomainClass.set_topLeft_Y(y : double);
begin
topLeft_Y := y;
end;

procedure subDomainClass.set_width(w : double);
begin
width := w;
end;

procedure subDomainClass.set_height(h : double);
begin
height := h;
end;

function subDomainClass.get_Name():String;
begin
result := name;
end;

function subDomainClass.get_topLeft_X():double;
begin
result := topLeft_X;
end;

function subDomainClass.get_topLeft_Y():double;
begin
result := topLeft_Y;
end;

function subDomainClass.get_width():double;
begin
result := width;
end;

function subDomainClass.get_height():double;
begin
result := height;
end;

Constructor subDomainClass.Create(Nam : string; x,y,w,h : double); 
begin
set_Name(nam);
set_topLeft_X(x);
set_topLeft_Y(y);
set_width(w);
set_height(h);
end;
    
end.
